//
//  ClassifyTableViewCell.m
//  网络FM
//
//  Created by dengzhicheng on 15/5/22.
//  Copyright (c) 2015年 dengzhicheng.com. All rights reserved.
//

#import "ClassifyTableViewCell.h"

@implementation ClassifyTableViewCell

- (void)dealloc
{
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.subView = [[UIView alloc] initWithFrame:CGRectMake(5, 10, [[UIScreen mainScreen] bounds].size.width - 10, 100)];
        [self.contentView addSubview:_subView];
        [_subView release];
        
        self.aImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
        [_subView addSubview:_aImage];
        [_aImage release];
        
        self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(110, 10, _subView.frame.size.width - 110 - 80 , 20)];
        [_nameLabel setFont:[UIFont boldSystemFontOfSize:15.0]];
        [_subView addSubview:_nameLabel];
        [_nameLabel release];
        
        self.likeButton = [[UIButton alloc] initWithFrame:CGRectMake(_subView.frame.size.width - 60, 10, 60, 20)];
        _likeButton.titleLabel.font = [UIFont systemFontOfSize:12];
        _likeButton.titleLabel.textAlignment = 0;
        [_likeButton setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
        [_subView addSubview:_likeButton];
        [_likeButton release];
        
        self.authorImage = [[UIImageView alloc] initWithFrame:CGRectMake(110, 40, 10, 10)];
        [_subView addSubview:_authorImage];
        [_authorImage release];
        
        self.authorLabel = [[UILabel alloc] initWithFrame:CGRectMake(125, 40, _subView.frame.size.width - _authorImage.bounds.origin.x, 10)];
        _authorLabel.font = [UIFont systemFontOfSize:12.0];
        _authorLabel.textColor = [UIColor grayColor];
        [_subView addSubview:_authorLabel];
        [_authorLabel release];
        
        self.introduceLabel = [[UILabel alloc] initWithFrame:CGRectMake(110, 60, _subView.frame.size.width - 120, 40)];
        _introduceLabel.font = [UIFont systemFontOfSize:12.0];
        _introduceLabel.textColor = [UIColor grayColor];
        _introduceLabel.numberOfLines = 0;
        [_subView addSubview:_introduceLabel];
        [_introduceLabel release];
        
        
    }
    return self;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
